package com.learn.base.controller;

import com.learn.base.annotation.RedisLock;
import com.learn.base.annotation.ResubmitCheck;
import com.learn.base.model.BaseResponse;
import com.learn.base.model.redisson.RedissonReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : Yu.Tan
 * @date : 2023/2/8 14:47
 * @desc : **
 */
@RestController
@RequestMapping("/learn/resubmit")
@Api(tags = "Resubmit测试")
@AllArgsConstructor
public class ResubmitController {

    @ApiOperation("Resubmit测试方法一")
    @PostMapping("/test")
    @ResubmitCheck(expire = 2)
    public BaseResponse<String> redissonTest(@RequestBody RedissonReq req){
        System.out.println("测试系统");
        return BaseResponse.success("XSDD2022");
    }
}
